#include <stdio.h>
#include <string.h>

int main()
{
	char *mesg = "Don't be a fool!";
	char *copy;

	copy = mesg;

	printf("%s\n", copy);   /* Don't be a fool! */

    /* mesg = Don't be a fool! : &mesg = 0x7ffdc6ca8d48 : value = 0x555a25828008 */
	printf("mesg = %s : &mesg = %p : value = %p\n", mesg, &mesg, mesg); 

    /* copy = Don't be a fool! : &copy = 0x7ffdc6ca8d50 : value = 0x555a25828008 */
	printf("copy = %s : &copy = %p : value = %p\n", copy, &copy, copy); 

    /* sizeof(mesg) = 8 : strlen(mesg) : 16 */
	printf("sizeof(mesg) = %d : strlen(mesg) : %ld\n", sizeof(mesg), strlen(mesg)); 

	return 0;
}

#if 0

00000000000011a9 <main>:
    11a9:	f3 0f 1e fa          	endbr64 
    11ad:	55                   	push   %rbp
    11ae:	48 89 e5             	mov    %rsp,%rbp
    11b1:	48 83 ec 20          	sub    $0x20,%rsp
    11b5:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
    11bc:	00 00 
    11be:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
    11c2:	31 c0                	xor    %eax,%eax
    11c4:	48 8d 05 3d 0e 00 00 	lea    0xe3d(%rip),%rax         # rax=0x555555556008: "Don't be a fool!"
    11cb:	48 89 45 e8          	mov    %rax,-0x18(%rbp)         # 0x7fffffffe2a8: 0x555555556008
    11cf:	48 8b 45 e8          	mov    -0x18(%rbp),%rax         # rax=0x555555556008
    11d3:	48 89 45 f0          	mov    %rax,-0x10(%rbp)         # 0x7fffffffe2b0: 0x555555556008
    11d7:	48 8b 45 f0          	mov    -0x10(%rbp),%rax         # rax=0x555555556008
    11db:	48 89 c7             	mov    %rax,%rdi                # rdi=0x555555556008
    11de:	e8 9d fe ff ff       	callq  1080 <puts@plt>          # puts(rdi)
    11e3:	48 8b 4d e8          	mov    -0x18(%rbp),%rcx         # rcx=0x555555556008
    11e7:	48 8b 45 e8          	mov    -0x18(%rbp),%rax         # rax=0x555555556008
    11eb:	48 8d 55 e8          	lea    -0x18(%rbp),%rdx         # rdx=0x7fffffffe2a8
    11ef:	48 89 c6             	mov    %rax,%rsi                # rsi=0x555555556008
    11f2:	48 8d 3d 27 0e 00 00 	lea    0xe27(%rip),%rdi        # 0x555555556020: "mesg = %s : &mesg = %p : value = %p\n"
    11f9:	b8 00 00 00 00       	mov    $0x0,%eax
    11fe:	e8 ad fe ff ff       	callq  10b0 <printf@plt>
    1203:	48 8b 4d f0          	mov    -0x10(%rbp),%rcx         # rcx=0x555555556008
    1207:	48 8b 45 f0          	mov    -0x10(%rbp),%rax         # rax=0x555555556008
    120b:	48 8d 55 f0          	lea    -0x10(%rbp),%rdx         # rdx=0x7fffffffe2b0
    120f:	48 89 c6             	mov    %rax,%rsi                # rsi=0x555555556008
    1212:	48 8d 3d 2f 0e 00 00 	lea    0xe2f(%rip),%rdi        # 0x555555556048: "copy = %s : &copy = %p : value = %p\n"
    1219:	b8 00 00 00 00       	mov    $0x0,%eax
    121e:	e8 8d fe ff ff       	callq  10b0 <printf@plt>
    1223:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
    1227:	48 89 c7             	mov    %rax,%rdi
    122a:	e8 61 fe ff ff       	callq  1090 <strlen@plt>        # strlen(0x555555556008)
    122f:	48 89 c2             	mov    %rax,%rdx
    1232:	be 08 00 00 00       	mov    $0x8,%esi                # esi=8
    1237:	48 8d 3d 32 0e 00 00 	lea    0xe32(%rip),%rdi        # 2070 <_IO_stdin_used+0x70>
    123e:	b8 00 00 00 00       	mov    $0x0,%eax
    1243:	e8 68 fe ff ff       	callq  10b0 <printf@plt>
    1248:	b8 00 00 00 00       	mov    $0x0,%eax
    124d:	48 8b 75 f8          	mov    -0x8(%rbp),%rsi
    1251:	64 48 33 34 25 28 00 	xor    %fs:0x28,%rsi
    1258:	00 00 
    125a:	74 05                	je     1261 <main+0xb8>
    125c:	e8 3f fe ff ff       	callq  10a0 <__stack_chk_fail@plt>
    1261:	c9                   	leaveq 
    1262:	c3                   	retq   

(gdb) x/18c 0x555555556008 
0x555555556008: 68 'D'  111 'o' 110 'n' 39 '\'' 116 't' 32 ' '  98 'b'  101 'e'
0x555555556010: 32 ' '  97 'a'  32 ' '  102 'f' 111 'o' 111 'o' 108 'l' 33 '!'
0x555555556018: 0 '\000'        0 '\000'

#endif